package com.jcl.cloud.services.unicrawler.service;


import com.jcl.cloud.common.service.exception.JclCrawlException;
import com.jcl.cloud.services.unicrawler.common.dto.GrabRequest;
import com.jcl.cloud.services.unicrawler.common.dto.GrabResult;
import com.jcl.cloud.services.unicrawler.task.CrawlerTaskHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CrawlerTaskService {
    @Autowired
    private CrawlerTaskHandler crawlerTaskHandler;


    public GrabResult grabTask(GrabRequest grabReq) throws JclCrawlException{

        GrabResult grabResult = this.crawlerTaskHandler.grabTask(grabReq);
        return grabResult;
    }


}
